def output(self, out):
out.write(self.value)
- def prettyprint(self, line, _):
+ def prettyprint(self, line):
line.output(self)
def show(self, out):
def output(self, out):
out.write(' ' * self.width)
- def prettyprint(self, line, _):
+ def prettyprint(self, line):
line.output(self)
def show(self, out):
def output(self, out):
out.write(' ' * self.width)
- def prettyprint(self, line, _):
+ def prettyprint(self, line):
if line.breaks(self.space):
self.active = 1
line.newline(self.indent)
block.newline()
block.addtoline(self)
- def prettyprint(self, line, _):
+ def prettyprint(self, line):
line.newline(0)
line.output(self)
lastbreak.space = (width - lastwidth)
self.width = width
- def prettyprint(self, line, _):
+ def prettyprint(self, line):
for x in self.content:
x.prettyprint(line)
def addtoline(self, x):
self.lines[-1].write(x)
- def prettyprint(self, line, _):
+ def prettyprint(self, line):
self.indent = line.used
line.block = self
if not line.fits(self.width):
self.block = self.block.parent
def prettyprint(self, out=sys.stdout):
- self.top.prettyprint(Line(out, self.width), self.width)
+ self.top.prettyprint(Line(out, self.width))
class SXPPrettyPrinter(PrettyPrinter):
"""An SXP prettyprinter.